package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.IMyJoinTaskActivityModel;
import com.wgts.wgts.mvp.model.imp.MyJoinTaskActivityModel;
import com.wgts.wgts.mvp.presenter.IMyJoinTaskActivityPresenter;
import com.wgts.wgts.mvp.presenter.imp.MyJoinTaskActivityPresenter;
import com.wgts.wgts.mvp.view.IMyJoinTaskActivityView;
import com.wgts.wgts.netmodle.NetService;

import dagger.Module;
import dagger.Provides;

/*
 *
 *
 */
@Module
public class MyJoinTaskActivityModule {
    private IMyJoinTaskActivityView view;

    public MyJoinTaskActivityModule(IMyJoinTaskActivityView view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    public IMyJoinTaskActivityView provideView(){
        return view;
    }

    @ActivityScope
    @Provides
    public IMyJoinTaskActivityModel provideModel(NetService netService){
        return new MyJoinTaskActivityModel(netService);
    }

    @ActivityScope
    @Provides
    public IMyJoinTaskActivityPresenter providePresenter(IMyJoinTaskActivityView view, IMyJoinTaskActivityModel model){
        return new MyJoinTaskActivityPresenter(view, model);
    }
}
